<?php
/*
 * @Author: 李志刚
 * @CopyRight: 2020-2030 衡水山木枝技术服务有限公司
 * @Date: 2021-10-19 10:17:50
 * @Description: 门店自己配置的基础配置信息
 * @LastEditors: 李志刚
 * @LastEditTime: 2021-10-20 09:16:42
 * @FilePath: /归档/user/2021_10_19_101750_create_shop_config.php
 */

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateShopConfig extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('shop_config', function (Blueprint $table) {
            $table->engine = 'InnoDB';
            $table->id();
            $table->foreignId('shop_id')->comment('店铺ID');
            $table->text('describe')->nullable()->comment('简介');
            $table->string('thumb', 255)->nullable()->comment('封面图');
            $table->foreignId('province_id')->default(0)->comment('省');
            $table->foreignId('city_id')->default(0)->comment('市');
            $table->foreignId('area_id')->default(0)->comment('区');
            $table->string('address', 255)->nullable()->comment('详细地址');
            $table->string('lat')->nullable()->comment('纬度');
            $table->string('lnt')->nullable()->comment('经度');
            $table->time('begin_at')->default('08:00')->comment('门店开始时间');
            $table->time('end_at')->default('20:00')->comment('门店结束时间');
            $table->string('card_username', 20)->nullable()->comment('银行');
            $table->string('bank_card_number', 20)->nullable()->comment('银行卡号');
            $table->char('card_phone', 11)->nullable()->comment('银行绑定的手机号');
            $table->tinyInteger('is_ziti')->default(0)->comment('是否有自提（1是  0否）');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('shop_config');
    }
}
